package top.wshape1.shiziapi.project.domain.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author Wshape1
 * @version 1.0
 * @description
 * @since 2023-10-22
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonInclude
public class DocVo {

    /**
     * 文档ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    private String name;

    /**
     * folder api markdown rtf
     */
    private String type;

    private int order;

    private List<DocVo> children;

    public DocVo(Long id, String name, String type, int order) {
        this.id = id;
        this.name = name;
        this.type = type;
        this.order = order;
    }
}
